﻿using System;
using System.Collections.Generic;
using System.Text;
using StockTrader.BusinessService.DataContract.Mortgate;

namespace Mortgage.DDL
{
    public class ContractUI
    {
        public string Name { set; get; }
        public string Gender { set; get; }
        public string AccountNo { set; get; }
        public string IDcardNo { get; set; }
        public DateTime IDcardDate { get; set; }
        public string IDcardIssuer { get; set; }
        public string PhoneMobile { get; set; }
        public string PhoneFix { get; set; }
        public string Email { get; set; }
        public string AddressContact { get; set; }
        public string AddressResident { get; set; }

        public string ContractNo { set; get; }
        public DateTime StartDate { set; get; }
        public DateTime EndDate { set; get; }
        public decimal Fee { set; get; }
        public decimal PenaltyFee { set; get; }
        public decimal ProcessFee { set; get; }
        public int ContractType { get; set; }
        public decimal ContractValue { set; get; }
        public string OriginalContract { set; get; }


        public List<StocksUI> Collate { set; get; }

        public ContractUI() { }
        public ContractUI(string accno, string name, string gender, string idcardno, DateTime idcarddate, string issuer, string phonemobile, string phonefix, string email, string contact, string resident, string contractno, DateTime from, DateTime to, decimal amount, decimal fee, decimal penalty, decimal processfee, int type, string original, List<StocksUI> collate)
        {
            Name = name;
            Gender = gender;
            AccountNo = accno;
            IDcardDate = idcarddate;
            IDcardNo = idcardno;
            IDcardIssuer = issuer;
            PhoneMobile = phonemobile;
            PhoneFix = phonefix;
            Email = email;
            AddressContact = contact;
            AddressResident = resident;

            ContractNo = contractno;
            StartDate = from;
            EndDate = to;
            ContractValue = amount;
            Fee = Fee;
            PenaltyFee = penalty;
            ContractType = type;
            ProcessFee = processfee;
            OriginalContract = original;

            Collate = collate;
        }
        public ContractUI(AccountData acc, ContractData con)
        {
            Name = acc.Name;
            Gender = acc.Gender;
            AccountNo = acc.AccountNo;
            IDcardDate = acc.IDcardDate;
            IDcardNo = acc.IDcardNo;
            IDcardIssuer = acc.IDcardIssuer;
            PhoneMobile = acc.PhoneMobile;
            PhoneFix = acc.PhoneFix;
            Email = acc.Email;
            AddressContact = acc.AddressContact;
            AddressResident = acc.AddressResident;

            ContractNo = con.ContractNo;
            StartDate = con.StartDate;
            EndDate = con.EndDate;
            ContractValue = con.ContractValue;
            Fee = con.Fee;
            PenaltyFee = con.PenaltyFee;
            ContractType = con.ContractType;
            ProcessFee = con.ProcessFee;
            OriginalContract = con.OriginalContract;
        }
    }
}
